<template>
  <div class="table-wrapper">
    <div>
      <p>共
        <el-tag>{{ dataTable.length }}</el-tag>
        条正式课数据
      </p>
    </div>
    <el-table
      :data="dataTable"
      border
      style="width: 100%"
    >
      <el-table-column prop="orgCode" label="机构编号"/>
      <el-table-column prop="orgName" label="机构名称"/>
      <el-table-column prop="deliveryOrg" label="交付机构"/>
      <el-table-column prop="userAccount" label="用户账号"/>
      <el-table-column prop="userName" label="用户姓名"/>
      <el-table-column prop="coachAccount" label="陪练账号"/>
      <el-table-column prop="coachName" label="陪练姓名"/>
      <el-table-column prop="materialName" label="资料名称"/>
      <el-table-column prop="materialType" label="资料类型"/>
      <el-table-column prop="coachType" label="陪练类型"/>
      <el-table-column prop="reviewMethod" label="复习方式"/>
      <el-table-column prop="deleteStatus" label="删除状态"/>
      <el-table-column prop="practiceTime" label="练习时间"/>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'deletePracticeRecords',
  props: {
    tableData: {
      type: Array,
      default: () => []
    },
    coachAccount: {
      type: String,
      default: ''
    }
  },
  created() {
    this.tableData.forEach(item => {
      if (item.coachAccount === this.coachAccount) {
        this.dataTable.push(item)
      }
    })
  },
  data() {
    return {
      dataTable: []
    }
  }
}
</script>

<style scoped lang="scss">
.table-wrapper {
  padding: 20px;
}
</style>
